<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>添加/修改页面</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../component/elementUI/index.css">
    <link rel="stylesheet" href="../../../component/pear/css/pear.css" />
    <link rel="stylesheet" href="../../../style/wangeditor.css">
    <link rel="stylesheet" href="../../../style/index.css">
</head>

<body>
    <div id="app" v-cloak>
        <div class="add">
            <div class="header">
                <span>{{(action == 'Add'?'添加':'修改')}}生产任务</span>
            </div>
            <div class="main" style="padding: 0 15px;">
                <div id="form" :data-options="JSON.stringify({'tableName':'MoTask_Finished','formName':'dataForm' ,'primaryKey':'MoTask_Finished_SerialNumber'})">
                   </div>
                <div class="table_titel">
                    <div class="titel">生产任务</div>
                </div>
                <el-form :model="dataForm" ref="form" :inline-message="true" style="width: 100%">
                    <el-descriptions :column="2" size="large" border>
                        <el-descriptions-item>
                            <template slot="label">
                                <div class="cell-item required">任务名称</div>
                            </template>
                            <el-form-item prop="MoTask_Name" :rules="[{ required: true, message: '请输入任务名称', trigger: 'blur' }]">
                                <el-input v-model.trim="dataForm.MoTask_Name" placeholder="请输入任务名称" clearable></el-input>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template slot="label">
                                <div class="cell-item required">成品</div>
                            </template>
                            <el-form-item prop="Article_SerialNumber" :rules="[{ required: true, message: '请输入成品名称', trigger: 'blur' }]">
                                <el-select  v-model.trim="dataForm.Article_SerialNumber" placeholder="请选择成品名称" style="width: 100%;" clearable filterable>
                                    <el-option  v-for="(item,index) in article_info" :key="index" :label="item.Article_Name" :value="item.Article_SerialNumber" />
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template slot="label">
                                <div class="cell-item required">成品数量</div>
                            </template>
                            <el-form-item prop="Qty" :rules="[{ required: true, message: '请输入成品数量', trigger: 'blur' }]">
                                <el-input v-model.trim="dataForm.Qty" placeholder="请输入成品数量" clearable></el-input>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template slot="label">
                                <div class="cell-item required">入库批次号</div>
                            </template>
                            <el-form-item prop="BatchNo" :rules="[{ required: true, message: '请输入入库批次号', trigger: 'blur' }]">
                                <el-input v-model.trim="dataForm.BatchNo" placeholder="请输入入库批次号" clearable></el-input>
                            </el-form-item>
                        </el-descriptions-item>
                         <el-descriptions-item>
                            <template slot="label">
                                <div class="cell-item required">作物产品来源地</div>
                            </template>
                            <el-form-item prop="Land_SerialNumber" :rules="[{ required: true, message: '请输入作物产品来源地', trigger: 'blur' }]">
                                <el-select  v-model.trim="dataForm.Land_SerialNumber" placeholder="请选择作物产品来源地" style="width: 100%;" clearable filterable>
                                    <el-option  v-for="(item,index) in land_info" :key="index" :label="item.Land_Name" :value="item.Land_SerialNumber" />
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template slot="label">
                                <div class="cell-item required">产线</div>
                            </template>
                            <el-form-item prop="Production_Line_SerialNumber" :rules="[{ required: true, message: '请输入产线', trigger: 'blur' }]">
                                <el-select  v-model.trim="dataForm.Production_Line_SerialNumber" placeholder="请选择产线" style="width: 100%;" clearable filterable>
                                    <el-option  v-for="(item,index) in production_line" :key="index" :label="item.Workshop" :value="item.Production_Line_SerialNumber" />
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template slot="label">
                                <div class="cell-item required">备注</div>
                            </template>
                            <el-form-item prop="Memo" :rules="[{ required: true, message: '请输入备注', trigger: 'blur' }]">
                                <el-input v-model.trim="dataForm.Memo" placeholder="请输入备注" clearable></el-input>
                            </el-form-item>
                        </el-descriptions-item> 
                        </el-descriptions>                               
                </el-form>
            </div>
            <div class="footer">
                <el-button size="medium" @click="handleBack">返回</el-button>
                <el-button size="medium" type="primary" plain @click=" handleSubmit " :loading="loading">提交</el-button>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="../../../utils/wangeditor.js"></script>
    <script type="text/javascript" src="../../../utils/xlsx.full.min.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.min.js"></script> 
    <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../utils/vuex.min.js"></script>
    <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../utils/components.js"></script>
    <script type="text/javascript" src="../../../utils/compressor.js"></script>
    <script type="text/javascript" src="../../../utils/validity.js"></script>
    <script type="text/javascript" src="../../../utils/utils.js"></script>
    <script type="text/javascript" src="../../../utils/http.js"></script>
    <script type="text/javascript" src="js/add.js"></script>
</body>

</html>